var util = require('../../utils/util.js')
Page({
  data: {
    list: []
  },
  bindViewTap : function(event){
    var d = event.currentTarget.dataset;
    wx.navigateTo({
      url: '../content/content?id=' + d.id
    })
  },
  onLoad: function (options) {
    console.log(options);
    var that = this
    wx.request({
      url: 'http://localhost:8080/home/listSections',
      data : {
        bookId : options.id
      },
      success : function(res){
        var list = res.data;
        that.setData({list:list});
      }
    });
  }
})